// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addPaper POST /api/paper/add */
export async function addPaperUsingPost(
  body: API.PaperAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/paper/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deletePaper POST /api/paper/delete */
export async function deletePaperUsingPost(
  body: API.PaperDeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/paper/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getPaperById GET /api/paper/get */
export async function getPaperByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getPaperByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePaper_>('/api/paper/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listPaperByPage GET /api/paper/list/page */
export async function listPaperByPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listPaperByPageUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePagePaper_>('/api/paper/list/page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** updatePaper POST /api/paper/update */
export async function updatePaperUsingPost(
  body: API.PaperUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/paper/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
